package decorator;

import factory.Shape;
import lombok.extern.slf4j.Slf4j;

/**
 * @author zenghy
 **/
@Slf4j
public abstract class ShapeDecorator implements Shape {

    private Shape decoratedShape;

    protected ShapeDecorator(Shape decoratedShape) {
        this.decoratedShape = decoratedShape;
    }

    @Override
    public void draw() {
        decoratedShape.draw();
        enhancedBehavior(decoratedShape);
    }

    protected void enhancedBehavior(Shape shape) {
        log.info("decorate behavior");
    }
}